package com.yuyou.fn.tradingservice.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.platform.entity.SysUser;
import com.yuyou.fn.tradingservice.entity.ServiceComment;
import com.yuyou.fn.tradingservice.vo.AvgEvaluation;
import com.yuyou.fn.tradingservice.vo.ServiceCommentVo;

import java.util.List;

/**
 *
 * ServiceComment 表数据服务层接口
 *
 */
public interface IServiceCommentService extends ISuperService<ServiceComment,Long> {

    void addComment(ServiceCommentVo commentVo, SysUser user);

    Page<ServiceComment> findPageComment(Long productId,int pageNo,int pageSize);

    List<ServiceComment> findByProductId(Long productId);

    AvgEvaluation findAvgByProductIdOrCategoryId(AvgEvaluation avgEvaluation);

    Long countByProductId(Long productId);
}